<template>
	<view class="content">
		<view class="wid100 dis disAl disJuC" style="height: 150rpx;background-color: #035DFF;">
			<view class="wid87 dis disAl">
				<!-- <uni-icons type="info" size="50rpx" color="#fff"></uni-icons> -->
				<uni-icons type="checkbox" size="50rpx" color="#fff"></uni-icons>
				<view class="mar-left10 coFFF fowe600">
					<view class="foSi35">已完成</view>
					<view class="mar-top10 foSi30">您的订单已完成</view>
				</view>
			</view>
		</view>
		<view class="wid100 bacFFF">
			<view class="wid90 mar dis disAl" style="height: 101rpx;">
				<image src="../../static/jiayou.png" style="width: 36rpx;height: 35rpx;"></image>
				<view class="mar-left10 fowe600 foSi35">{{orderInfo.gasstation.name}}</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">订单号</view>
				<view class="foSi28">{{orderInfo.ordernum}}</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">下单时间</view>
				<view class="foSi28">{{orderInfo.createtime}}</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">油品型号</view>
				<view class="foSi28">{{orderInfo.oil_type}}</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">单价</view>
				<view class="foSi28">{{orderInfo.unitprice}}元/升</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">升数</view>
				<view class="foSi28">{{orderInfo.liters}}升</view>
			</view>
		</view>
		<view class="wid100 bacFFF mar-top30">
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">支付方式</view>
				<view class="foSi28">{{orderInfo.pay_type==0?'微信支付':'余额支付'}}</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">订单金额</view>
				<view class="foSi28">¥{{orderInfo.total_amount}}</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">会员折扣</view>
				<view class="foSi28">{{orderInfo.vip_discount}}折</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">积分抵扣</view>
				<view class="foSi28">{{orderInfo.point_deduction}}积分</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">优惠券</view>
				<view v-if="orderInfo.coupon_money" class="foSi28">{{orderInfo.coupon_money}}</view>
				<view v-if="!orderInfo.coupon_money" class="foSi28">未使用</view>
			</view>
			<view class="wid100 xia"></view>
			<view class="wid90 mar dis disAl disJuB hei80">
				<view class="foSi30">实付金额</view>
				<view class="foSi30" style="color: #035DFF;">¥{{orderInfo.pay_amount}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 0,
				orderInfo: ''
			}
		},
		onLoad(option) {
			this.id = option.id
			this.getList()
		},
		onShow() {},
		methods: {
			getList() {
				var that = this;
				uni.request({
					url: that.global.url + '/api/qianyu_petrol/gasstation_pay_order_info',
					method: "POST",
					header: {
						'site-id': that.global.site_id,//自定义请求头信息
						'token': uni.getStorageSync('token')
					},
					data: {
						id: that.id,
					},
					success(res) {
						let result = res.data
						console.log(result)
						if (result.code == 1) {
							that.orderInfo = result.data
						}
					}
				})
			},
		}
	}
</script>

<style>
	.content {
		background: #F8F9FD;
		min-height: 100vh;
	}
	.xia{
		height: 1rpx;
		background: #EEEEEE;
	}
</style>
